﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" AutoEventWireup="true" CodeBehind="List.aspx.cs" Inherits="MVCClubSite.Web.Views.Locations.List" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
<div class="contentblock">
<h2>Locations</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam tincidunt, turpis id vehicula condimentum, mauris arcu aliquam tellus, pretium ultrices quam enim non felis. Fusce eget elit. Etiam eleifend scelerisque ligula. Proin malesuada tristique metus. Aenean ligula magna, aliquet et.</p>
 <% if (User.IsInRole("Administrator")) { %>
    <%= Html.ActionLink("Create Location", "New", "Locations") %>
 <% } %>
 <hr />
 <br />
  <% foreach (Location l in ViewData.Model.Locations)
    {%>
 <div class="location">
    <h3>  <%= Html.ActionLink(l.Title, "Details", "Locations", new { id = l.ID}, null) %></h3>
    <%= l.Description %></p>
       
 </div>

 <%} %>
 
 </div>
</asp:Content>
